﻿using System;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI.Selection;

namespace Parapet.Controller
{
	public class RefCurveFilter : ISelectionFilter
	{
		public bool AllowElement(Element elem)
		{
			if (typeof(DetailLine) != elem.GetType() && typeof(DetailArc) != elem.GetType())
			{
				return false;
			}
			DetailCurve detailCurve = elem as DetailCurve;
			return detailCurve != null && detailCurve.LineStyle.Name.IndexOf(BaseLineController.m_StrLineNamePrefix) == -1;
		}

		public bool AllowReference(Reference reference, XYZ pos)
		{
			return false;
		}
	}
}
